<template>
  <div>
    <panel-statistic></panel-statistic>

    <div class="card mb-3" v-if="orgLever < 2">
      <div class="card-body">
        <chart-customer-area></chart-customer-area>
      </div>
    </div>

    <div v-else class="d-flex mb-2">
      <div class="card flex-2 pr-3">
        <div class="card-body">
          <chart-project-analy></chart-project-analy>
        </div>
      </div>
      <div class="card flex-1 ml-3">
        <div class="card-body">
          <chart-funds-analy></chart-funds-analy>
        </div>
      </div>
    </div>

    <div class="d-flex mb-2">
      <div class="card flex-1 mr-3">
        <div class="card-body">
          <panel-task></panel-task>
        </div>
      </div>
      <div class="card flex-1 mr-3">
        <div class="card-body">
          <panel-tools></panel-tools>
        </div>
      </div>
      <div class="card flex-1">
        <div class="card-body">
          <panel-search></panel-search>
        </div>
      </div>
    </div>

    <div class="text-muted text-center" style="line-height: 1">
      <small v-html="TEXT_COPYRIGHT"></small>
    </div>
  </div>
</template>

<script>
import PanelStatistic from './PanelStatistic'
import ChartCustomerArea from './ChartCustomerArea'
import PanelTask from './PanelTask'
import PanelTools from '@/bank/views/index/PanelTools'
import PanelSearch from './PanelSearch'
import { TEXT_COPYRIGHT } from '@/common/plugins/constant'
import { mapGetters } from 'vuex'
import ChartProjectAnaly from '@/bank/views/index/ChartProjectAnaly'
import ChartFundsAnaly from '@/bank/views/index/ChartFundsAnaly'
export default {
  components: {
    PanelStatistic,
    ChartCustomerArea,
    PanelTask,
    PanelSearch,
    PanelTools,
    ChartProjectAnaly,
    ChartFundsAnaly,
  },
  props: {},
  data: () => ({
    TEXT_COPYRIGHT,
  }),
  computed: {
    ...mapGetters(['user']),
    orgLever() {
      return +this.user.orgRegionLever
    },
  },
  watch: {},
  created() {},
  mounted() {},
  methods: {},
}
</script>

<style lang="scss" scoped>
.flex-2 {
  flex: 2;
}
</style>
